package com.ldzl.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 库存盘点对象 ck_stock_taking
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ck_stock_taking")
public class CkStockTaking extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 盘点ID */
    @TableId(value = "taking_id", type = IdType.AUTO)
    private Long takingId;

    /** 盘点单号 */
    @Excel(name = "盘点单号")
    private String takingCode;

    /** 盘点名称 */
    @Excel(name = "盘点名称")
    private String takingName;

    /** 盘点类型 */
    @Excel(name = "盘点类型")
    private String takingType;

    /** 用户ID */
    private Long userId;

    /** 用户名称 */
    @Excel(name = "用户名称")
    private String userName;

    /** 部门ID */
    private Long departmentId;

    /** 部门名称 */
    @Excel(name = "部门名称")
    private String departmentName;

    /** 是否盲盘 */
    @Excel(name = "是否盲盘", readConverterExp = "Y=是,N=否")
    private String blindFlag;

    /** 是否冻结库存 */
    @Excel(name = "是否冻结库存", readConverterExp = "Y=是,N=否")
    private String frozenFlag;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 仓库ID */
    private Long warehouseId;

    /** 盘点日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "盘点日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkDate;

    /** 盘点状态 */
    @Excel(name = "盘点状态", readConverterExp = "0=草稿,1=进行中,2=已完成,3=已取消")
    private String status;

    /** 审核状态 */
    @Excel(name = "审核状态", readConverterExp = "0=未提交,1=待审核,2=已通过,3=已驳回")
    private String approveStatus;

    /** 审核人 */
    @Excel(name = "审核人")
    private String approveBy;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approveTime;

    /** 审核意见 */
    private String approveComment;

    /** 盘点数量 */
    @Excel(name = "盘点数量")
    private BigDecimal quantityNum;

    /** 盘点差异数量 */
    @Excel(name = "盘点差异数量")
    private BigDecimal differenceQuantity;

    /** 盘点金额 */
    @Excel(name = "盘点金额")
    private BigDecimal amountNum;

    /** 盘点差异金额 */
    @Excel(name = "盘点差异金额")
    private BigDecimal differenceAmount;

    /** 预留字段1 */
    private String attr1;

    /** 预留字段2 */
    private String attr2;

    /** 预留字段3 */
    private Integer attr3;

    /** 预留字段4 */
    private Integer attr4;

    /** 是否删除 */
    private String isDelete;

    /** 仓库名称 */
    @TableField(exist = false)
    private String warehouseName;

    /** 盘点明细列表 */
    @TableField(exist = false)
    private List<CkStockTakingResult> details;
} 